package com.cy.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class ProviderController {
    /**@value 注解用于告诉spring 从application.yml，application.properties中取出*/
        @Value("${server.port}")
        private String server;
        @GetMapping(value = "/provider/echo/{string}")
        public String echo(@PathVariable String string) {
            return server+"say:Hello Nacos Discovery " + string;
        }
    }

